cmake_minimum_required(VERSION 3.14)
project(src_)
set(CMAKE_CXX_STANDARD 17)
# 添加依赖头文件
set(INCLUDE ${PROJECT_SOURCE_DIR}/include)
include_directories(${INCLUDE})

message(src_DIR:${PROJECT_SOURCE_DIR})
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})

IF (APPLE)
    set(LIB ${PARENT_SOURCE_PATH}/lib-macos/)
    link_directories(${LIB})
    link_libraries(libimgui.dylib libglad.dylib libglfw.3.dylib libassimp.dylib libfmod.dylib libbox2d.a libstb_image.a libfreetype.dylib)
ELSEIF (WINDOWS)
    set(LIB ${PARENT_SOURCE_PATH}/lib-windows/)
    link_directories(${LIB})
    link_libraries(glad.lib glfw3.lib libbox2d.lib freetype.dll libSOIL.a)

ELSEIF (LINUX)
ENDIF ()
aux_source_directory(. DIR)
aux_source_directory(./util UTIL)
aux_source_directory(./engine ENGINE)
aux_source_directory(./game GAME)
aux_source_directory(./game/automation AUTOMATION)
aux_source_directory(./game/map MAP)
add_executable(src_ ${DIR} ${UTIL} ${ENGINE} ${GAME} ${AUTOMATION} ${MAP})

add_library(src_test ${DIR} ${UTIL} ${ENGINE} ${GAME} ${AUTOMATION} ${MAP})
target_link_libraries(src_test ${OpenCV_LIBS})